<?php
    require_once "config.php";
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Hotels With Offers</title>

<script language="Javascript" type="text/javascript" src="js/jquery.min.js"></script>

<script language="Javascript" type="text/javascript" src="js/jquery.countdown.js"></script>
<link href="css/jquery.countdown.css" rel="stylesheet" type="text/css" />

<link href="css/main.css" rel="stylesheet" type="text/css" />
<script language="javascript" type="text/javascript">
         $(function(){
          <?php
               $offer_hour = substr($offer_details['offer_end_date'], 11, 2) ;
               $offer_min =  substr($offer_details['offer_end_date'], 14, 2);
               $offer_sec =  substr($offer_details['offer_end_date'], 17, 2);
               $offer_day =  substr($offer_details['offer_end_date'], 8, 2);
               $offer_month = substr($offer_details['offer_end_date'], 5, 2);
               $offer_year =  substr($offer_details['offer_end_date'], 0, 4);
               ?>
        var austDay = new Date(<?=$offer_year?>,<?=($offer_month-1)?>,<?=$offer_day?>,<?=$offer_hour?>,<?=$offer_min?>,<?=$offer_sec?>);
	$('#countdown').countdown({until: austDay});

<?php


        ?>

      });



		</script>
</head>

<body>
<div id="wrapper">
    <?php require_once 'top_header.php'; ?>
    
<div class="contentPane">
  <div id="sidebar">
    <span class="menu"><img src="images/call.png" alt="Advertise with Hotel with Offers" class="callus"  /></span>
    <div class="joinus">
      <h1>INVITE A FRIEND</h1>
      <h2>Tell a friend and win Rs100.00</h2>
      <div class="joinbtn"><a href="#">LEARN&nbsp;MORE</a></div>
     </div>
    <div class="reserve"><span class="reserveitem">Reserved for :</span> <span class="reserveitem">advertising</span> <span class="reserveitem">latest news</span> <span class="reserveitem">soon ending deals &amp; offers</span></div>
  </div>
  <div class="leftPane">
      <div class="mainMenu"><?php require_once 'main_menu.php'; ?></div>
     <?php //require_once 'newsletter_plug.php'; ?>
    <div id="Listings">
      <div class="listingdetails">
          <?php
          	$hotels_obj = new Hotels();
    		$hotels_details = $hotels_obj->listHotels();    		
    	?>
    		<table width="100%" border="0">
    	<?php
    		foreach ($hotels_details as $hotel_entry)
    		{
    			$country = $hotels_obj->getCountryById($hotel_entry['country_id']);
    			
    	?>
    			<tr>
    				<td width=20%"><img src="" width="200" height="200" /></td>
    				<td width="50%">
    					<p><a href="listing.php?offer_prefix=<?php echo $hotel_entry['offer_prefix']; ?>"><b><?php echo $hotel_entry['hotel_name']; ?></b></a></p>
    					<p><?php echo substr($hotel_entry['hotel_description'], 0, 150) . "..."; ?></p>
    				</td>
    				<td width="30%" valign="top">
    					<p><?php echo ucfirst($country[0]['country_name']); ?></p>
    				</td>
    			</tr>
    	<?php		
    		}
          ?>
          </table>
      </div>

    </div>
    <br class="clear">
</div>
</div>
<br class="clear" />
</div>
<div id="footerWrapper">
<?php require_once 'footer.php'; ?>
</div>
</body>
</html>
